package cn.hanyx.coder.design.pattern.behavioral.strategy.demo01;

import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Client01
 *
 * @author hanyx
 * @date 2020/06/04
 */
public class Client01 {
    public static void main(String[] args) {
        Sorter sorter = new Sorter();
        sorter.sortFile("test");

        List<Sorter> list = new ArrayList<>();
        list.add(sorter);
        list.add(null);
        list = list.stream().filter(d -> d != null).collect(Collectors.toList());
        System.out.println(list);
    }
}
